begin tran
declare @upd_id int 

select @upd_id = max(upd_id) from posSync.dbo.pos_sync_id
select @upd_id
update  igs_parm set var_data = @upd_id+1 where var_name ='gv_upd_id'

select * from igs_parm where var_name ='gv_upd_id'
commit tran